<script language="javascript">
function clip() {
 	// width of the banner container
 	var contWidth = 180;
 	// height of the banner container
 	var contHeight = 215;

 	var id1 = document.getElementById('slideA');
 	var id2 = document.getElementById('slideB');
 	var height = id1.offsetHeight;
 	
 	id1.style.top = parseInt(id1.style.top)-1 + 'px';
 	
 	document.getElementById('slideCont').style.height = contHeight + "px";
 	document.getElementById('slideCont').style.clip = 'rect(auto,'+ contWidth +'px,' + contHeight +'px,auto)';
 	id2.style.display = '';
 	if(parseFloat(id1.style.top) == -(height/2)) {
  		id1.style.top = '0px';
 	}
 	setTimeout(clip,50)
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  clip();
});
</script>
<div id="right">
    <div class="event">
        <div class="hd"></div>
        <div class="bd">
            <div class="top"></div>
            <div class="bdy">
                <div id="slideCont" style="position: relative; z-index: 1; left: 0px; overflow: hidden; height: 215px; clip: rect(auto, 180px, 215px, auto);">
                    <div id="slideA" style="position: absolute; z-index: 1; top: -587px; left: 0px; width: 190px; overflow: hidden;">
                   <? foreach($list_bnright as $rs):?>
                     <a href="" style="margin:1px;"><img src="<?=base_url()?>uploads/images/<?=$rs->BannerImg?>" border="0" width="190"></a>
                        <div id="slideB" style="position: relative; z-index: 1; top: 0px; left: 0px; width: 190px; overflow: hidden;">
					   <? foreach($list_bnright as $rs):?>
                         <a href="" style="margin:1px;"><img src="<?=base_url()?>uploads/images/<?=$rs->BannerImg?>" border="0" width="190"></a>
						<? endforeach ;?>
                          </div>
              	<? endforeach ;?>
                    </div>
                </div>
            </div>
            <div class="bot"></div>
        </div>
    </div>
    <div class="biquyet">
        <div class="hd"></div>
        <div class="bd">
            <ul>
            	<? foreach($listnew as $rs){?>
                <li><a href="<?=base_url()?>news/detail/<?=$rs->news_id?>/<?=$rs->alias?>.html"><img src="<?=base_url()?>uploads/images/<?=$rs->image?>" align="left" width="40"><?=$rs->title_vn?></a></li>
                <? } ?>
            </ul>
        </div>
    </div>
</div>

